package com.panku.service.impl;

import com.panku.entity.Product;
import com.panku.service.IProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import  com.panku.dao.ProductDao;

/**
 * @Author: jack
 * @Description:
 * @Date Create in 8:23 2021-02-02
 **/
@Service
public class ProductService implements IProductService {

    @Autowired
    private ProductDao productDao;

    @Override
    public Product get(Integer pid) {
        return productDao.findById(pid).get();
    }

    @Override
    public Product save(Product product) {
        return productDao.save(product);
    }
}
